/*
 * @Author: your name
 * @Date: 2022-04-12 19:14:42
 * @LastEditTime: 2022-04-12 22:37:03
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /safe_transmission_platform/src/codecFactory.cc
 */
#include "codecFactory.h"
#include "codec.h"

namespace daniel
{
    Codec *RequestFactory::createObject()
    {
        if (m_encodeStr.empty()){
            return new RequestCodec(m_reqInfo);
        }
        return new RequestCodec(m_encodeStr);
    }
    Codec *ResponseFactory::createObject()
    {
        if (m_encodeStr.empty()){
             return new ResponseCodec(m_respondInfo);
        }
        return new ResponseCodec(m_encodeStr);
    }

} // namespace daniel
